package com.shark.stock.services;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;

import com.shark.stock.model.User;

@Service
@RemotingDestination(channels = { "my-amf" })
public class LoginServiceImpl implements LoginService {

	private static final Logger logger = LoggerFactory.getLogger(LoginServiceImpl.class);

	@RemotingInclude
	public boolean loginRequest(User user) {
		logger.info("Java login!");
		logger.info(user.getName());
		logger.info(user.getPass());
		if (user.getName().equals("Gustavo") && user.getPass().equals("gabriel")) {
			return true;
		}
		return false;
	}

}
